package com.example.falvback.service;

import com.example.falvback.entity.Anli;
import com.example.falvback.mapper.AnliMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 功能：
 * 作者：chen
 * 日期：2023/12/716:27
 */
@Service
public class AnliService {
    @Autowired
    AnliMapper anliMapper;//自动注入service层

    public List<Anli> showAnli() {
        return anliMapper.showAnli();
    }

    public List<Anli> getAnliByColumn( String column ) {
        return anliMapper.getAnliByColumn(column);
    }

    public void insert(Anli anli) {
        anliMapper.insert(anli);
    }

    public List<Anli> findById(Long id) {
        return anliMapper.findById(id);
    }
    public void updateAnli(Anli anli) {
        anliMapper.updateAnli(anli);
    }

    public void deleteAnli(Integer id) {
        anliMapper.deleteAnli(id);
    }
}
